/**
 * Created with CLion.
 * Description: 
 * User: loong
 * Date: 2019-12-28
 * Time: 21:18
 */
#ifndef CLION_WIN_QT_USERDAO_H
#define CLION_WIN_QT_USERDAO_H

#include "src/model/User.h"
#include "src/utils/DBHelper.h"

class UserDao {
private:
    User user;
    QSqlTableModel *model;
public:
    /**
     * 功能：注册
     * @param user
     * @return
     */
    bool save(User user);

    /**
     * 功能：检查用户名
     * @param user
     * @return
     */
    bool checkUserInfo(User user);
    /**
     * 功能：检查用户密码是否正确
     * @param user
     * @return
     */
    bool checkPasswdInfo(User user);
    /**
     * 功能：获取用户所有信息
     * @param user
     * @return
     */
    //User getUserAll(User user);
};


#endif //CLION_WIN_QT_USERDAO_H
